<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-04 16:53:56
 * @LastEditTime: 2022-09-17 16:48:40
 * @LastEditors: CHINAKAIYUAN
 * @Description: 
 */

namespace App\Http\Services\System;

use App\Events\UploadFileEvent;

use App\Http\Services\Service;
use App\Repositories\AttachmentRepository;

class AttachmentService extends Service
{

    public function __construct(AttachmentRepository $repository)
    {
        $this->repository = $repository;
    }

    public function list()
    {
        $data = $this->repository->condition(request())->getGrid();
        return $data;
    }

    protected function upload()
    {
        $data = $this->repository->upload();
        return $data;
    }
    protected function delete()
    {
        return $this->repository->autodelete($this->getRequestIds());
    }
}
